package com.atguigu.ssyx.client.search;

import com.atguigu.ssyx.model.search.SkuEs;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

// 远程调用service-search模块接口获取需要的数据
@FeignClient("service-search")
public interface SearchFeignClient {

    @ApiOperation("获取爆款商品")
    @GetMapping("/api/search/sku/inner/findHotSkuList")
    public List<SkuEs> findHotSkuList();

    @ApiOperation("更新商品热度")
    @GetMapping("/api/search/sku/inner/updateHotSku/{skuId}")
    public Boolean updateHotSku(@PathVariable("skuId") Long skuId);
}
